﻿using System;
using System.Text;
using TI_BLE_HCI_ClientLib.GenericHCIEntities;
using TI_BLE_HCI_ClientLib.HCIBaseEntities;

namespace TI_BLE_HCI_ClientLib.HCIEvents
{
    public class HCIEvent_ATT_Exchange_MTU_Request : HCIEvent_GATT_Base_Event
    {
        public ushort ClientReceiveMTUSize
        {
            get
            {
                switch (base.PduLen)
                {
                    case 2:
                        return (ushort)(base.Pdu[0] + (base.Pdu[1] << 8));
                }

                throw new ArgumentException("PduLen!=2");
            }
        }

        public HCIEvent_ATT_Exchange_MTU_Request(HCIVendorSpecificEventHostErrorCode status,
            ushort connHandle, byte pduLen, byte[] pdu) : base(status, connHandle, pduLen, pdu)
        {
        }
    }
}
